package com.spring.mvc.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.spring.mvc.bean.T0009maesProv;
import com.spring.mvc.dao.T0009maesProvMapper;

@Service
public class ProvinciaServiceImpl implements ProvinciaService {
	@Autowired
	private T0009maesProvMapper t0009maesProvMapper;


	@Override
	public T0009maesProv selectByCodProv(String cod_depa,String cod_prov) throws Exception {
		T0009maesProv t0009maesProv=t0009maesProvMapper.selectByPrimaryKey(cod_depa,cod_prov);
		return t0009maesProv;
	}

	@Override
	public List<T0009maesProv> selectAllProvincia(String codeDepa) throws Exception {
		Map<String, Object> paran=new HashMap<String, Object>();
		if(codeDepa!=null){
			paran.put("COD_DEPA", codeDepa);
//			paran.put("COD_PROV", codProvincia);
		}
		List<T0009maesProv> listaProvincia=t0009maesProvMapper.selectAllProvincia(paran);

		return listaProvincia;
	}

}
